/*
 * # iohao.com . 渔民小镇
 * Copyright (C) 2021 - present double joker （262610965@qq.com） . All Rights Reserved.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */
package com.iohao.game.spring.common.pb;

import com.baidu.bjf.remoting.protobuf.annotation.ProtobufClass;
import com.iohao.game.spring.common.SpringGameProtoFile;
import com.iohao.game.spring.common.Update;
import com.iohao.game.widget.light.protobuf.ProtoFileMerge;
import jakarta.validation.constraints.*;
import lombok.AccessLevel;
import lombok.ToString;
import lombok.experimental.FieldDefaults;


/**
 * 学校信息
 *
 * @author 渔民小镇
 * @date 2022-07-09
 */
@ToString
@ProtobufClass
@FieldDefaults(level = AccessLevel.PUBLIC)
@ProtoFileMerge(fileName = SpringGameProtoFile.COMMON_FILE_NAME, filePackage = SpringGameProtoFile.COMMON_FILE_PACKAGE)
public class SchoolPb {

    /** 学校的 email */
    @NotNull
    @Email
    String email;

    /** 学校最大教室容量 */
    @Max(value = 100, message = "学校最大教室容量不能超过 100 个")
    int classCapacity;

    /** 学校老师数量 */
    @Min(value = 60, message = "学校老师数量不能少于 60 个")
    int teacherNum;

    /** 学校名 */
    @NotBlank(groups = Update.class)
    String name;

}
